<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>#{$sys.title}#</title>
    <meta name="keywords" content="#{$sys.title}#  #{$sys.name}# #{$sys.companyname}#">
    <meta name="description" content="#{$sys.title}#  #{$sys.name}# #{$sys.companyname}#">
    <script>
        addEventListener("load", function () {
            setTimeout(hideURLbar, 0);
        }, false);

        function hideURLbar() {
            window.scrollTo(0, 1);
        }
    </script>
    <!-- Meta tags -->
    <!--stylesheets-->
    <link href="#{$smarty.const.APP}#/View/template/login/css/style.css" rel='stylesheet' type='text/css' media="all">
    <!--//style sheet end here-->
    <link href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,600,700" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>if (window.top !== window.self) {
        window.top.location = window.location;
    }</script>
</head>

<body class="gray-bg">
<div class="mid-class">
    <div class="art-right-w3ls">
        <h2>#{$sys.name}#系统管理登录中心</h2>
        <form action="#{$smarty.const.ACT}#/sysmanage/Login/login/" method="post">
            <div class="main">
                <div class="form-left-to-w3l">
                    <input type="text" name="account" placeholder="用户名" required="">
                </div>
                <div class="form-left-to-w3l ">
                    <input type="password" name="password" placeholder="密码" required="">
                    <div class="clear"></div>
                </div>
            </div>
            <div class="left-side-forget">
                <input type="checkbox" class="checked">
                <span class="remenber-me">记住密码 </span>
            </div>
            <div class="right-side-forget">
                <a href="#" class="for">Forgot password...?</a>
            </div>
            <div class="clear"></div>
            <div class="btnn">
                <button type="button" class="login-btn">登 录</button>
            </div>
        </form>
        <div class="w3layouts_more-buttn">
            <h3><a href="http://www.07fly.top/">获取演示帐号密码</a></h3>
            <p><img src="#{$smarty.const.APP}#/View/template/login/images/258.jpg" width="100"></p>
        </div>
    </div>
    <div class="art-left-w3ls">
        <h1 class="header-w3ls">
            #{$sys.companyname}#
        </h1>
    </div>
</div>
<!-- 全局js -->
<script src="#{$smarty.const.APP}#/View/template/js/jquery.min.js?v=2.1.4"></script>
<script src="#{$smarty.const.APP}#/View/template/js/bootstrap.min.js?v=3.3.6"></script>
<!-- layer javascript -->
<script src="#{$smarty.const.APP}#/View/template/js/plugins/layer/layer.min.js"></script>
<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?6cbae336ef2e6fc07bbcab9a0872e082";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
    //回车登录
    $("body").keydown(function (event) {//当按下按键时
        if (event.which == 13) {//.which属性判断按下的是哪个键，回车键的键位序号为13
            ajaxlogin();
        }
    });
    //点击登录
    $("body").on("click", ".login-btn", function () {
        ajaxlogin();
    });

    //登录提示
    function ajaxlogin() {
        FormData = $("form").serialize();
        $.ajax({
            type: "POST",
            url: "#{$smarty.const.ACT}#/sysmanage/Login/login_auth/",
            data: FormData,
            dataType: "json",
            success: function (data) {
                if (data.statusCode == '200') {
                    layer.msg('操作成功', {icon: 1});
                    window.location.href = data.message;
                } else {
                    layer.msg(data.message, {icon: 5});
                }
            }
        });
    }
</script>
</body>
</html>
